:root {
  /* 主题色 */
  --el-color-primary: #6366f1;
  --el-color-primary-light-3: #818cf8;
  --el-color-primary-light-5: #a5b4fc;
  --el-color-primary-light-7: #c7d2fe;
  --el-color-primary-light-9: #e0e7ff;
  --el-color-primary-dark-2: #4f46e5;

  /* 成功色 */
  --el-color-success: #10b981;
  --el-color-success-light-3: #34d399;
  --el-color-success-light-5: #6ee7b7;
  --el-color-success-light-7: #a7f3d0;
  --el-color-success-light-9: #d1fae5;
  --el-color-success-dark-2: #059669;

  /* 警告色 */
  --el-color-warning: #f59e0b;
  --el-color-warning-light-3: #fbbf24;
  --el-color-warning-light-5: #fcd34d;
  --el-color-warning-light-7: #fde68a;
  --el-color-warning-light-9: #fef3c7;
  --el-color-warning-dark-2: #d97706;

  /* 危险色 */
  --el-color-danger: #ef4444;
  --el-color-danger-light-3: #f87171;
  --el-color-danger-light-5: #fca5a5;
  --el-color-danger-light-7: #fecaca;
  --el-color-danger-light-9: #fee2e2;
  --el-color-danger-dark-2: #dc2626;

  /* 信息色 */
  --el-color-info: #3b82f6;
  --el-color-info-light-3: #60a5fa;
  --el-color-info-light-5: #93c5fd;
  --el-color-info-light-7: #bfdbfe;
  --el-color-info-light-9: #dbeafe;
  --el-color-info-dark-2: #2563eb;

  /* 背景色 */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-hover: #e2e8f0;
  --bg-mask: rgba(0, 0, 0, 0.45);
  --bg-gradient: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));

  /* 文本色 */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-disabled: #94a3b8;
  --text-white: #ffffff;

  /* 边框色 */
  --border-color: #e2e8f0;
  --border-color-lighter: #f1f5f9;
  --border-color-darker: #cbd5e1;

  /* 阴影 */
  --shadow-light: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-inset: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* 间距 */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* 圆角 */
  --border-radius-sm: 6px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --border-radius-2xl: 24px;
  --border-radius-full: 9999px;

  /* 过渡 */
  --transition-all: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-transform: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-opacity: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-colors: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  line-height: 1.5;
}

/* 布局容器 */
.page-container {
  padding: var(--spacing-lg);
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-gradient);
}

/* 卡片样式 */
.el-card {
  border-radius: var(--border-radius-lg) !important;
  border: none !important;
  box-shadow: var(--shadow-light) !important;
  transition: var(--transition-all) !important;
  overflow: hidden;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9) !important;
}

.el-card:hover {
  box-shadow: var(--shadow-hover) !important;
  transform: translateY(-2px);
}

/* 表单样式 */
.el-form-item__label {
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
}

.el-input__wrapper,
.el-textarea__wrapper {
  border-radius: var(--border-radius-md) !important;
  box-shadow: 0 0 0 1px var(--border-color) !important;
  transition: var(--transition-all) !important;
  background-color: var(--bg-primary) !important;
}

.el-input__wrapper:hover,
.el-textarea__wrapper:hover {
  box-shadow: 0 0 0 1px var(--el-color-primary-light-5) !important;
}

.el-input__wrapper.is-focus,
.el-textarea__wrapper.is-focus {
  box-shadow: 0 0 0 1px var(--el-color-primary) !important;
  transform: translateY(-1px);
}

/* 按钮样式 */
.el-button {
  border-radius: var(--border-radius-md) !important;
  font-weight: 500 !important;
  transition: var(--transition-bounce) !important;
  position: relative;
  overflow: hidden;
}

.el-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.el-button:active::after {
  animation: ripple 0.6s ease-out;
}

.el-button--primary {
  background: linear-gradient(135deg, var(--el-color-primary), var(--el-color-primary-dark-2)) !important;
  border: none !important;
}

.el-button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
}

/* 表格样式 */
.el-table {
  border-radius: var(--border-radius-lg) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-light) !important;
}

.el-table th {
  background-color: var(--bg-tertiary) !important;
  font-weight: 600 !important;
  transition: var(--transition-colors) !important;
}

.el-table td {
  padding: var(--spacing-md) !important;
  transition: var(--transition-colors) !important;
}

.el-table tr:hover td {
  background-color: var(--bg-hover) !important;
}

/* 对话框样式 */
.el-dialog {
  border-radius: var(--border-radius-xl) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-lg) !important;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95) !important;
}

.el-dialog__header {
  padding: var(--spacing-lg) !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--border-color-lighter) !important;
  background: var(--bg-gradient) !important;
}

.el-dialog__body {
  padding: var(--spacing-lg) !important;
}

.el-dialog__footer {
  padding: var(--spacing-lg) !important;
  border-top: 1px solid var(--border-color-lighter) !important;
  background-color: var(--bg-tertiary) !important;
}

/* 标签样式 */
.el-tag {
  border-radius: var(--border-radius-full) !important;
  padding: 0 var(--spacing-md) !important;
  font-weight: 500 !important;
  transition: var(--transition-all) !important;
}

.el-tag:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-light) !important;
}

/* 下拉菜单样式 */
.el-dropdown-menu {
  border-radius: var(--border-radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  border: none !important;
  padding: var(--spacing-sm) !important;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95) !important;
}

.el-dropdown-menu__item {
  border-radius: var(--border-radius-md) !important;
  margin: 2px 0 !important;
  transition: var(--transition-all) !important;
}

.el-dropdown-menu__item:hover {
  background-color: var(--bg-hover) !important;
  transform: translateX(4px);
}

/* 分页样式 */
.el-pagination {
  justify-content: flex-end !important;
  padding: var(--spacing-md) 0 !important;
}

.el-pagination .el-pagination__total,
.el-pagination .el-pagination__jump {
  margin-right: var(--spacing-md) !important;
}

.el-pagination .btn-prev,
.el-pagination .btn-next {
  border-radius: var(--border-radius-md) !important;
  transition: var(--transition-all) !important;
}

.el-pagination .btn-prev:hover,
.el-pagination .btn-next:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-light) !important;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

.fade-enter-active,
.fade-leave-active {
  transition: var(--transition-opacity);
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
  transition: var(--transition-transform);
}

.slide-enter-from,
.slide-leave-to {
  transform: translateY(10px);
  opacity: 0;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .page-container {
    padding: var(--spacing-md);
  }

  .el-dialog {
    width: 90% !important;
    margin: var(--spacing-md) auto !important;
  }

  .el-form-item__label {
    float: none !important;
    display: block !important;
    text-align: left !important;
    padding: 0 0 var(--spacing-xs) !important;
  }

  .el-form-item__content {
    margin-left: 0 !important;
  }
}

/* 暗色主题 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --bg-hover: #334155;
    --bg-gradient: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-tertiary: #cbd5e1;
    --text-disabled: #64748b;
    
    --border-color: #334155;
    --border-color-lighter: #1e293b;
    --border-color-darker: #475569;
    
    --shadow-light: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
  }

  .el-card {
    background-color: rgba(30, 41, 59, 0.9) !important;
  }

  .el-table {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
  }

  .el-table th {
    background-color: var(--bg-tertiary) !important;
  }

  .el-table tr {
    background-color: var(--bg-primary) !important;
  }

  .el-table--striped .el-table__body tr.el-table__row--striped td {
    background-color: var(--bg-tertiary) !important;
  }

  .el-dialog {
    background-color: rgba(30, 41, 59, 0.95) !important;
  }

  .el-dialog__title {
    color: var(--text-primary) !important;
  }

  .el-input__wrapper,
  .el-textarea__wrapper {
    background-color: var(--bg-tertiary) !important;
  }

  .el-button {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
  }

  .el-button--primary {
    background: linear-gradient(135deg, var(--el-color-primary), var(--el-color-primary-dark-2)) !important;
    color: var(--text-white) !important;
  }

  .el-dropdown-menu {
    background-color: rgba(30, 41, 59, 0.95) !important;
  }
}